﻿@using System.Collections.Concurrent
@using HinduShop.Domain.Models.Account
@using HinduShop.UI.ViewModels.Account
@model HinduShop.UI.ViewModels.Account.EditRolesViewModel
@{
    ViewBag.Title = "EditRoles";
}
<h2>
    Редактирование ролей</h2>
<h3>
    Пользователь @Model.UserName</h3>
<fieldset>
    <legend>Роли пользователя</legend>
    @using (Html.BeginForm())
    {
        @Html.HiddenFor(x => x.UserId)

        <li>
            @*@foreach (RoleModel role in Model.RolesList)
            {
                <ul>
                    @Html.CheckBox(role.RoleName, Model.RolesOfUser.Any(x => x.RoleName == role.RoleName))
                    @Html.Label(role.RoleName)
                </ul>
            }*@

            <ul>
                @Html.CheckBoxFor(x => x.AdminChecked) Администратор
            </ul>
            <ul>
                @Html.CheckBoxFor(x => x.UserChecked) Пользователь
            </ul>
        </li>

        <input type="submit" value = "Сохранить" />
        
@*        <text>Роли пользователя:</text>
        
        @Html.ListBoxFor(m => m.SelectedItemFromRolesOfUser, Model.RolesOfUserSelectList)
        
        <input type="submit" value="Удалить" name="buttonName"/>
        
        <text>Доступные роли:</text>
        
        @Html.ListBoxFor(m => m.SelectedItemFromRolesList, Model.RolesSelectList)

        <input type="submit" value="Добавить" name="buttonName"/>*@
    }
</fieldset>
